<?php
/***************************************************************
*  DYNAMO - Simple yet powerful CMS - www.dynamocms.com
*  Copyright (c) M31 2003-2008 - www.m31web.com
*
*  This script is part of the DYNAMO project. The DYNAMO
*  project is free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html or included in the distribution
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
*
*  File Name: xxx.php
*      XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
* 	
*  File Authors:
*      1.0 : Creation by Jean-Francois Faudi
* 
***************************************************************/

	// fonction pour envoyer des emails
	function sendUrlEmail($mailing, $title, $url)
	{
		global $HTTP_HOST;
		
		$mailHeaders  = "MIME-Version: 1.0\r\n";
		$mailHeaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
		$mailHeaders .= "From: support@fleximage.fr\n"; 

		$mailSubject = $title;

		$mailBody = "<html><head><title>" . $title . "</title></head><body bgcolor=\"#D2F0FF\"><font color=\"#000099\" face=\"Verdana, Arial\"><p>" . $title . "<br>";
		$mailBody = $mailBody . "<a target=\"_blank\" href=\"" . $url . "\">" . $url . "</a></p></font></body></html>";

		$ok = mail($mailing, $mailSubject, $mailBody, $mailHeaders);
		return $ok;
	}
	
	// fonction pour envoyer des emails
	function sendHtmlEmail($mailing, $title, $body)
	{
		global $HTTP_HOST;
		
		$mailHeaders  = "MIME-Version: 1.0\r\n";
		$mailHeaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
		$mailHeaders .= "From: support@fleximage.fr\n"; 

		$mailSubject = $title;

		$mailBody = "<html><head><title>" . $title . "</title></head><body bgcolor=\"#D2F0FF\"><font color=\"#000099\" face=\"Verdana, Arial\"><p>" . $title . "<br><br>";
		$mailBody = $body . "</p></font></body></html>";

		$ok = mail($mailing, $mailSubject, $mailBody, $mailHeaders);
		return $ok;
	}

?>